#ifndef LCD_H_
#define LCD_H_

#include<p30f4011.h>
#include <stdio.h>
//#include <delays.h>
#include <string.h>

#define E_pin	LATFbits.LATF0 	// CONFIG LIJNEN DISPLAY
#define RW_pin	LATFbits.LATF1	// '' '' 
#define RS_pin	LATEbits.LATE0	// '' '' 

#define E_TRIS	TRISFbits.TRISF0 	// CONFIG LIJNEN DISPLAY
#define RW_TRIS	TRISFbits.TRISF1	// '' '' 
#define RS_TRIS	TRISEbits.TRISE0	// '' '' 

#define DB4_TRIS	TRISEbits.TRISE4	// DATALIJNEN DISPLAY VOOR TRIS REGISTER
#define DB5_TRIS	TRISEbits.TRISE3	// '' '' 
#define DB6_TRIS	TRISEbits.TRISE2	// '' '' 
#define DB7_TRIS	TRISEbits.TRISE1	// '' '' 

#define DB4	LATEbits.LATE4 	// DATALIJEN DISPLAY
#define DB5	LATEbits.LATE3	// '' '' 
#define DB6	LATEbits.LATE2	// '' '' 
#define DB7	LATEbits.LATE1	// '' '' 

#define _BV(bit) (1 << (bit))

//int DATA;


void FLUSH();
void DATA2PIN(unsigned char DATA);
void Character2LCD (unsigned char DATA);
void COMMAND2LCD (unsigned char DATA); 
void ddram2LCD (unsigned char DATA);
void putsROM2LCD(char *s);
void puts2LCD (char*s);
void Int2LCD (int i);
void Dec2LCD (int i);
void CURSOR_HOME(void);
void Line1(void);
void Line2(void);\
void MoveCursor(char line,char mc_row);
void InitLCD(void);
void DELAY_40US(void);
void DELAY_40MS(void);
#endif
